package com.newer.dao.sys.mapper;

import com.newer.pojo.sys.Organization;
import com.newer.pojo.sys.OrganizationExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface OrganizationMapper {
    int countByExample(OrganizationExample example);

    int deleteByExample(OrganizationExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Organization record);

    int insertSelective(Organization record);

    List<Organization> selectByExample(OrganizationExample example);

    Organization selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Organization record, @Param("example") OrganizationExample example);

    int updateByExample(@Param("record") Organization record, @Param("example") OrganizationExample example);

    int updateByPrimaryKeySelective(Organization record);

    int updateByPrimaryKey(Organization record);
    
    
    /**
     * 检查部门是否存在
     */
    Organization selectByOrganizationName(@Param("organizationName")String organizationName);
    
    
	/**
	 * 删除部门
	 * 
	 * @param list
	 * @return
	 */
	int deleteOrganization(List<Integer> ids);

	/**
	 * 查询子集
	 * 
	 * @param list
	 * @return
	 */
	List<Integer> selectNodeIds(List<Integer> ids);
}